package JavaSE.StreamLearning.OutputException;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 *  测试 try with resources 方法处理输入输出流的异常
 */
public class OutputException {
    public static void main(String[] args) {
        try(FileOutputStream fos = new FileOutputStream("sss\\a.txt")) {
            fos.write("nih".getBytes());
        } catch (IOException e ) {
            e.printStackTrace();
        }
    }
}
